package cn.iocoder.yudao.module.forward.dal.mysql.ack;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.forward.dal.dataobject.ack.Ack1DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.forward.controller.admin.ack.vo.*;

/**
 * 应答信息 Mapper
 *
 * @author zhang
 */
@Mapper
public interface Ack1Mapper extends BaseMapperX<Ack1DO> {

    default PageResult<Ack1DO> selectPage(Ack1PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Ack1DO>()
                .eqIfPresent(Ack1DO::getMsgId, reqVO.getMsgId())
                .betweenIfPresent(Ack1DO::getReceivetTime, reqVO.getReceivetTime())
                .betweenIfPresent(Ack1DO::getSendTime, reqVO.getSendTime())
                .eqIfPresent(Ack1DO::getSourceId, reqVO.getSourceId())
                .eqIfPresent(Ack1DO::getBrokerId, reqVO.getBrokerId())
                .orderByDesc(Ack1DO::getId));
    }

}